import java.util.Scanner;

public class Main {
    public void menu(){
        Graph g = new Graph();
        g.createDN();
        int vexNum = g.getVexNum();
        VNode[] vexs = g.getVexs();
        ArcNode[][] arcs = g.getArcs();
        Search s = new Search(vexNum,vexs,arcs);
        Display d = new Display(vexNum,vexs,arcs);
        Allroads ar = new Allroads();
        MainMoney mm = new MainMoney();
        MainTime mt = new MainTime();

        System.out.println("—————————————————————主菜单—————————————————————");
        System.out.println("（1）显示所有城市的航班信息。");
        System.out.println("（2）多条件查询。");
        System.out.println("（3）查询两个城市间所有中转方案。");
        System.out.println("（4）查询两个城市间票价花费最少的旅行方案。");
        System.out.println("（5）查询两个城市间乘机时间最少的旅行方案。");
        System.out.println("（0）退出。");
        System.out.println("———————————————————————————————————————————————");
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        switch (i) {
            case 1:
                d.display();
                break;
            case 2:
                s.Search_main();
                break;
            case 3:
                ar.allroads();
                break;
            case 4:
                mm.mainMoney();
                break;
            case 5:
                mt.mainTime();
                break;
            case 0:
                break;
            default:
                System.out.println("请输入1、2、3、4、5、0进行选择。");
                break;
        }
    }
    public static void main(String[] args) {
        Main m = new Main();
        m.menu();
    }
}
